package com.leyou.item.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.leyou.common.dto.PageDTO;
import com.leyou.item.dto.SpuDTO;
import com.leyou.item.entity.Spu;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author 虎哥
 */
public interface SpuService extends IService<Spu> {
    //商品分页查询
    PageDTO<SpuDTO> queryByPage(Long brandId, Long categoryId, Long id, Long page, Long rows, Boolean saleable);

    //新增商品
    void saveGoods(SpuDTO spuDTO);

    //下架商品
    void updateSpuSaleable(Long id, Boolean saleable);

    //修改商品
    void updateGoods(SpuDTO spuDTO);

    //商品回显时，需要先根据id查询到商品的spu、sku、spuDetail等信息
    SpuDTO queryGoodsById(Long id);
}
